package vista.panels;

import javax.swing.JPanel;
import javax.swing.GroupLayout;
import javax.swing.GroupLayout.Alignment;
import javax.swing.JLabel;
import javax.swing.LayoutStyle.ComponentPlacement;
import javax.swing.JTextField;
import javax.swing.JButton;
import javax.swing.JTable;
import javax.swing.JScrollBar;

import cliente.ClienteImp;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;

public class PanelSolicitudDeCotiazacion extends JPanel {
	

	/**
	 * Create the panel.
	 */
	public PanelSolicitudDeCotiazacion(ClienteImp cliente) {
		
		JLabel lblRazonSocial = new JLabel("Razon Social");
		JTextField txtRazonSoc;
		JTextField txtCuil;
		JTable table;
		JLabel lblCuil = new JLabel("Cuil");
		
		txtRazonSoc = new JTextField();
		txtRazonSoc.setColumns(10);
		
		txtCuil = new JTextField();
		txtCuil.setColumns(10);
		
		JButton btnBuscarCliente = new JButton("Buscar Cliente");
	
		JLabel lblListaProductos = new JLabel("Lista Productos");
		
		table = new JTable();
		GroupLayout groupLayout = new GroupLayout(this);
		groupLayout.setHorizontalGroup(
			groupLayout.createParallelGroup(Alignment.LEADING)
				.addGroup(groupLayout.createSequentialGroup()
					.addContainerGap()
					.addGroup(groupLayout.createParallelGroup(Alignment.LEADING)
						.addGroup(groupLayout.createSequentialGroup()
							.addGroup(groupLayout.createParallelGroup(Alignment.LEADING, false)
								.addGroup(groupLayout.createSequentialGroup()
									.addComponent(lblCuil, GroupLayout.PREFERRED_SIZE, 34, GroupLayout.PREFERRED_SIZE)
									.addPreferredGap(ComponentPlacement.RELATED)
									.addComponent(txtCuil))
								.addGroup(groupLayout.createSequentialGroup()
									.addComponent(lblRazonSocial)
									.addPreferredGap(ComponentPlacement.RELATED)
									.addComponent(txtRazonSoc, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)))
							.addPreferredGap(ComponentPlacement.RELATED)
							.addComponent(btnBuscarCliente))
						.addComponent(lblListaProductos)
						.addComponent(table, GroupLayout.PREFERRED_SIZE, 437, GroupLayout.PREFERRED_SIZE))
					.addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
		);
		groupLayout.setVerticalGroup(
			groupLayout.createParallelGroup(Alignment.LEADING)
				.addGroup(groupLayout.createSequentialGroup()
					.addGap(23)
					.addGroup(groupLayout.createParallelGroup(Alignment.BASELINE)
						.addComponent(lblRazonSocial)
						.addComponent(txtRazonSoc, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
						.addComponent(btnBuscarCliente))
					.addPreferredGap(ComponentPlacement.UNRELATED)
					.addGroup(groupLayout.createParallelGroup(Alignment.BASELINE)
						.addComponent(lblCuil)
						.addComponent(txtCuil, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
					.addPreferredGap(ComponentPlacement.RELATED)
					.addComponent(lblListaProductos)
					.addPreferredGap(ComponentPlacement.RELATED, 19, Short.MAX_VALUE)
					.addComponent(table, GroupLayout.PREFERRED_SIZE, 184, GroupLayout.PREFERRED_SIZE))
		);
		setLayout(groupLayout);
		/**
		 * Eventos
		 */
		btnBuscarCliente.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
				
			}
		});
		
		
	}
}
